package com.ruoyi.a2.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.a2.mapper.A2DiStAssociationMapper;
import com.ruoyi.a2.domain.A2DiStAssociation;
import com.ruoyi.a2.service.IA2DiStAssociationService;

/**
 * AIS/ADS-B动态信息与疑似目标的关联Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-14
 */
@Service
public class A2DiStAssociationServiceImpl extends ServiceImpl<A2DiStAssociationMapper, A2DiStAssociation> implements IA2DiStAssociationService
{
    @Autowired
    private A2DiStAssociationMapper a2DiStAssociationMapper;

    /**
     * 查询AIS/ADS-B动态信息与疑似目标的关联
     *
     * @param id AIS/ADS-B动态信息与疑似目标的关联主键
     * @return AIS/ADS-B动态信息与疑似目标的关联
     */
    @Override
    public A2DiStAssociation selectA2DiStAssociationById(Long id)
    {
        return a2DiStAssociationMapper.selectA2DiStAssociationById(id);
    }

    /**
     * 查询AIS/ADS-B动态信息与疑似目标的关联列表
     *
     * @param a2DiStAssociation AIS/ADS-B动态信息与疑似目标的关联
     * @return AIS/ADS-B动态信息与疑似目标的关联
     */
    @Override
    public List<A2DiStAssociation> selectA2DiStAssociationList(A2DiStAssociation a2DiStAssociation)
    {
        return a2DiStAssociationMapper.selectA2DiStAssociationList(a2DiStAssociation);
    }

    /**
     * 新增AIS/ADS-B动态信息与疑似目标的关联
     *
     * @param a2DiStAssociation AIS/ADS-B动态信息与疑似目标的关联
     * @return 结果
     */
    @Override
    public int insertA2DiStAssociation(A2DiStAssociation a2DiStAssociation)
    {
        a2DiStAssociation.setCreateTime(DateUtils.getNowDate());
        return a2DiStAssociationMapper.insertA2DiStAssociation(a2DiStAssociation);
    }

    /**
     * 修改AIS/ADS-B动态信息与疑似目标的关联
     *
     * @param a2DiStAssociation AIS/ADS-B动态信息与疑似目标的关联
     * @return 结果
     */
    @Override
    public int updateA2DiStAssociation(A2DiStAssociation a2DiStAssociation)
    {
        a2DiStAssociation.setUpdateTime(DateUtils.getNowDate());
        return a2DiStAssociationMapper.updateA2DiStAssociation(a2DiStAssociation);
    }

    /**
     * 批量删除AIS/ADS-B动态信息与疑似目标的关联
     *
     * @param ids 需要删除的AIS/ADS-B动态信息与疑似目标的关联主键
     * @return 结果
     */
    @Override
    public int deleteA2DiStAssociationByIds(Long[] ids)
    {
        return a2DiStAssociationMapper.deleteA2DiStAssociationByIds(ids);
    }

    /**
     * 删除AIS/ADS-B动态信息与疑似目标的关联信息
     *
     * @param id AIS/ADS-B动态信息与疑似目标的关联主键
     * @return 结果
     */
    @Override
    public int deleteA2DiStAssociationById(Long id)
    {
        return a2DiStAssociationMapper.deleteA2DiStAssociationById(id);
    }
}
